<?php

	if(!empty($_POST['email'])):
		include_once "common/inc/constants.inc.php";
		include_once "common/inc/class.mailbase.php";
		$e = trim($_POST['email']);
		
		$mail = new MailBase(); 
		$mail2 = new MailBase(); 
		

        $to = trim($e);

       

        $headers = <<<MESSAGE
		Welcome to Comicblocks!
		
MESSAGE;

        $msg = <<<EMAIL
<html>
	<body>
		<div style="-moz-border-radius: 3px; 
		-webkit-border-radius:3px; border-radius:
		3px; width:80%; margin:0 auto; border:solid 1px #646464; color: #646464">
		<div style="width:100%; height: 40px; background-color: #359fcc"></div>
			<div style="padding: 20px">
			<p>Welcome to Comicblocks,</p>
			<p>You have taken the first step to making Comicblocks a reality. As Comicblocks is new we can use all the help we can get.
			   Share the news with your friends at <a href="http://comicblocks.com">comicblocks.com</a> and family or helps us by donating via Indiegogo.com.</p>
			 <p>If you are an artist and want to join the team, then contact us at admin@comicblocks.com.</p>
			 <p>As one of our first members you will get an early access to BETA, until then stay tuned for new announcements, and once again thank you for helping to make Comiblocks a reality!</p>
			 <p>Thank you, <br /> The Comicblocks Team</p>
			 </div>
		</div>
	</body>


</html>

EMAIL;
		$mail->sendMail($to,"admin@comicblocks.com", "New User", $headers, $msg);
		$msg2 = "User ". $to . " has joined comicblocks!";
		$mail2->sendMail("admin@comicblocks.com","admin@comicblocks.com", "New User", "NEW USER", $msg2);
		
		
		
		
	else:
		echo "Failed";
		endif;
	
?>